﻿#pragma once

//////////////////////////////////////////////////////////////
//
//	仪器状态
//
//
// 2021-11-9
//
/////////////////////////////////////////////////////////////////

// CMachineStatusView 窗体视图
#define  WND_MSCUVE_ID			19300
#include "RealTimeChromG.h"
#include "BtnST.h"

class CMachineStatusView : public CFormView
{
	DECLARE_DYNCREATE(CMachineStatusView)

public:
	CMachineStatusView();           // 动态创建所使用的受保护的构造函数IDD_CMachineStatusView
	virtual ~CMachineStatusView();

public:
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_CMachineStatusView };
#endif
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif
	CRealTimeChromG		m_wndRTCurve;
	CButtonST			m_btFsRefresh;

private:
	CString		m_strFS[2][6];		//文件系统
	CString		m_strPT[14];		//温压
	int			m_nTimer;
	CRect		m_rtPT;
	long		m_nTick;
	CString		m_strOldMsg;
	int			m_nErrorLast;		//错误延续的时间
	int			m_nSamplePreErrorLast;	//样品气压力异常时间
	bool		m_bUpdateFormView;	//是否进行了刷新

private:
	void	Draw(CDC* pDC, CRect rt);
	void	DrawFileStatus(CDC* pDC, CRect rt);
	void	DrawWitsStatus(CDC* pDC, CRect rt);
	void	DrawPTStatus(CDC* pDC, CRect rt);

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	virtual void OnInitialUpdate();
	afx_msg void OnBnClickedBtfsrefresh();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
};


